<?php
// In the view.
echo $this->Session->flash();
?>

<div class="sidebar">
	<ul>
		<?php 
			echo "<li>".$this->Html->link('Applications',array('controller'=>'applications','action'=>'index'))."</li>";
				
			echo "<li>".$this->Html->link('--'.$sonapp['Application']['name'],array('controller'=>'versions','action'=>'VersionsOfApplication',$sonapp['Application']['id']))."</li>";

			echo "<li>".$this->Html->link('----'.$saversion['Version']['name'],array('controller'=>'tables','action'=>'TablesOfVersion',$saversion['Version']['id']))."</li>";

			echo "<li>".$this->Html->link('------'.$satable['Table']['name'],array('controller'=>'colonnes','action'=>'ColonnesOfTable',$satable['Table']['id']))."</li>";
		?>
	</ul>
</div>

<div class="colonnes index">
	<h2><?php echo __('Colonnes');?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('id');?></th>
			<th><?php echo $this->Paginator->sort('name');?></th>
			<th><?php echo $this->Paginator->sort('type');?></th>
			<th><?php echo $this->Paginator->sort('topPk');?></th>
			<th><?php echo $this->Paginator->sort('description');?></th>
			<!--th><?php //echo $this->Paginator->sort('table_id');?></th-->
			<th class="actions"><?php echo __('Actions');?></th>
	</tr>
	<?php
	foreach ($colonnes as $colonne): ?>
	<tr>
		<td><?php echo h($colonne['Colonne']['id']); ?>&nbsp;</td>
		<td><?php echo $this->Html->link($colonne['Colonne']['name'],array('action' => 'view', $colonne['Colonne']['id']))?>&nbsp;</td>
		<td><?php echo h($colonne['Pgtypecol']['name']); ?>&nbsp;<?php if ($colonne['Colonne']['longueur']) {	echo "(".h($colonne['Colonne']['longueur']).")"; }?>&nbsp;
		</td>
		<td><?php echo h($colonne['Colonne']['topPk']); ?>&nbsp;</td>
		<td><?php echo h($colonne['Colonne']['description']); ?>&nbsp;</td>
		<!--td>
			<?php //echo $this->Html->link($colonne['Table']['name'], array('controller' => 'tables', 'action' => 'view', $colonne['Table']['id'])); ?>
		</td-->
		<td class="actions">
			<!--?php echo $this->Html->link(__('View'), array('action' => 'view', $colonne['Colonne']['id'])); ?-->
			<!--?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $colonne['Colonne']['id'])); ?-->
			<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $colonne['Colonne']['id'],$satable['Table']['id']), null, __('Are you sure you want to delete # %s - %s?', $colonne['Colonne']['id'],$colonne['Colonne']['name'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
	));
	?>	</p>

	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('New Colonne'), array('action' => 'add',$satable['Table']['id'])); ?></li>
		<!--li><?php //echo $this->Html->link(__('List Tables'), array('controller' => 'tables', 'action' => 'index')); ?> </li-->
		<!--li><?php //echo $this->Html->link(__('New Table'), array('controller' => 'tables', 'action' => 'add')); ?> </li-->
		<!--li><?php //echo $this->Html->link(__('List Clerupts'), array('controller' => 'clerupts', 'action' => 'index')); ?> </li-->
		<!--li><?php //echo $this->Html->link(__('New Clerupt'), array('controller' => 'clerupts', 'action' => 'add')); ?> </li-->
		<!--li><?php //echo $this->Html->link(__('List Descriptifs'), array('controller' => 'descriptifs', 'action' => 'index')); ?> </li-->
		<!--li><?php //echo $this->Html->link(__('New Descriptif'), array('controller' => 'descriptifs', 'action' => 'add')); ?> </li-->
		<!--li><?php //echo $this->Html->link(__('List Donnees'), array('controller' => 'donnees', 'action' => 'index')); ?> </li-->
		<!--li><?php //echo $this->Html->link(__('New Donnee'), array('controller' => 'donnees', 'action' => 'add')); ?> </li-->
	</ul>
</div>
